package com.catazy.wanandroid.common_base.net.interceptor

import com.catazy.wanandroid.common_base.ext.logI
import okhttp3.Interceptor
import okhttp3.Response
import okhttp3.logging.HttpLoggingInterceptor

/**
 * 作者: Tao
 * 日期: 2024/4/10
 * 时间: 15:35
 * 描述: 提供日志拦截器
 */
object LoggingInterceptor {

    fun getLoggingInterceptor(): Interceptor {
        return HttpLoggingInterceptor().apply {
            HttpLoggingInterceptor.Logger {
                message -> logI("LoggingInterceptor", message)
            }
            level = HttpLoggingInterceptor.Level.BODY
        }
    }
}